<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>我的订单</title>
    <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport" />
    <meta content="yes" name="apple-mobile-web-app-capable" />
    <meta content="black" name="apple-mobile-web-app-status-bar-style" />
    <meta content="telephone=no" name="format-detection" />
    <link href="css/style_3.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="js/jquery.min.js"></script>
    <script type="text/javascript" src="js/tab.js"></script>
</head>

<body>


    <section class="aui-flexView">
        <header class="aui-navBar aui-navBar-fixed">
            <a href="/member" class="aui-navBar-item">
                <i class="icon icon-return"></i>
            </a>
            <div class="aui-center">
                <span class="aui-center-title">我的订单</span>
            </div>
            <a href="/kefu" class="aui-navBar-item">
                <i class="icon icon-sys"></i>
            </a>
        </header>
        <section class="aui-scrollView">
            <div class="aui-tab" data-ydui-tab>
                <ul class="tab-nav">
                    <li class="tab-nav-item tab-active">
                        <a href="javascript:;">全部</a>
                    </li>
                    <li class="tab-nav-item">
                        <a href="javascript:;">待付款</a>
                    </li>
                    <li class="tab-nav-item">
                        <a href="javascript:;">待收货</a>
                    </li>
                    <li class="tab-nav-item">
                        <a href="javascript:;">已完成</a>
                    </li>
                    <li class="tab-nav-item">
                        <a href="javascript:;">已取消</a>
                    </li>
                </ul>
                <div class="divHeight"></div>
                <div class="tab-panel">
                    <div class="tab-panel-item tab-active">
                        {{each data item}}
                        <div class="tab-item">
                            <a href="javascript:void(0);" class="aui-well-item aui-well-item-clear">
                                <div class="aui-well-item-hd">
                                    <img src="images/icon-logo.png" alt="">
                                </div>
                                <div class="aui-well-item-bd">
                                    <h3>魔霸旗舰店</h3>
                                </div>
                                <span class="aui-well-item-fr" data-id="{{item.id}}">{{item.pay}}</span>
                            </a>
                            <div class="aui-mail-product">
                                <a href="javascript:;" class="aui-mail-product-item">
                                    <div class="aui-mail-product-item-hd">
                                        <img src="{{item.iimg}}" alt="">
                                    </div>
                                    <div class="aui-mail-product-item-bd">
                                        <p>{{item.iname}} {{item.icurrent}} {{item.icurrent1}}
                                        </p>
                                    </div>
                                </a>
                            </div>
                            <a href="javascript:;" class="aui-mail-payment">
                                <p>
                                    共<em>{{item.inum}}</em>
                                    件商品 实付款: ￥<i>{{(item.inum*item.iprice).toFixed(2)}}</i>
                                </p>
                            </a>
                            <div class="aui-mail-button">
                                <a href="/detail?id={{item.iid}}">再次购买</a>
                                <a href="javascript:;" class="aui-df-color">评价晒单</a>
                                <a href="javascript:;" class="aui-df-color">查看发票</a>
                            </div>
                        </div>
                        <div class="divHeight"></div>
                        {{/each}}
                    </div>
                    <div class="tab-panel-item">
                        {{each data2 item}}
                        <div class="tab-item">
                            <a href="javascript:void(0);" class="aui-well-item aui-well-item-clear">
                                <div class="aui-well-item-hd">
                                    <img src="images/icon-logo.png" alt="">
                                </div>
                                <div class="aui-well-item-bd">
                                    <h3>魔霸旗舰店</h3>
                                </div>
                                <span class="aui-well-wait">等待付款</span>
                            </a>
                            <div class="aui-mail-product">
                                <a href="javascript:;" class="aui-mail-product-item">
                                    <div class="aui-mail-product-item-hd">
                                        <img src="{{item.iimg}}" alt="">
                                    </div>
                                    <div class="aui-mail-product-item-bd">
                                        <p class="a1" data-name="{{item.iname}}">{{item.iname}} {{item.icurrent}}
                                            {{item.icurrent1}}
                                        </p>
                                    </div>
                                </a>
                            </div>
                            <a href="javascript:;" class="aui-mail-payment">
                                <p>
                                    共<em>{{item.inum}}</em>
                                    件商品 实付款: ￥<i class="a2">{{(item.inum*item.iprice).toFixed(2)}}</i>
                                </p>
                            </a>
                            <div class="aui-mail-button">
                                <a href="/zhifu?id={{item.id}}">去支付</a>
                            </div>
                        </div>
                        {{/each}}
                    </div>
                    <div class="tab-panel-item">
                        {{each data1 item}}
                        <div class="tab-item">
                            <a href="javascript:void(0);" class="aui-well-item aui-well-item-clear">
                                <div class="aui-well-item-hd">
                                    <img src="images/icon-logo.png" alt="">
                                </div>
                                <div class="aui-well-item-bd">
                                    <h3>魔霸旗舰店</h3>
                                </div>
                                <span class="aui-well-wait">等待收货</span>
                            </a>
                            <div class="aui-mail-product">
                                <a href="javascript:;" class="aui-mail-product-item">
                                    <div class="aui-mail-product-item-hd">
                                        <img src="{{item.iimg}}" alt="">
                                    </div>
                                    <div class="aui-mail-product-item-bd">
                                        <p>{{item.iname}} {{item.icurrent}} {{item.icurrent1}}
                                        </p>
                                    </div>
                                </a>
                            </div>
                            <a href="javascript:;" class="aui-mail-payment">
                                <p>
                                    共<em>{{item.inum}}</em>
                                    件商品 实付款: ￥<i>{{(item.inum*item.iprice).toFixed(2)}}</i>
                                </p>
                            </a>
                            <div class="aui-mail-button">
                                <a href="javascript:;">等待收货</a>
                                <a href="javascript:;" class="aui-df-color">再次购买</a>
                                <a href="javascript:;" class="aui-df-color">查看物流</a>
                            </div>
                        </div>
                        {{/each}}
                    </div>
                    <div class="tab-panel-item">
                        <div class="tab-item">
                            <a href="javascript:void(0);" class="aui-well-item aui-well-item-clear">
                                <div class="aui-well-item-hd">
                                    <img src="images/icon-logo.png" alt="">
                                </div>
                                <div class="aui-well-item-bd">
                                    <h3>魔霸旗舰店</h3>
                                </div>
                                <span class="aui-well-item-fr"></span>
                            </a>
                            <div class="aui-mail-product">
                                <a href="javascript:;" class="aui-mail-product-item">
                                    <div class="aui-mail-product-item-hd">
                                        <img src="images/pd-004.png" alt="">
                                    </div>
                                    <div class="aui-mail-product-item-bd">
                                        <p>盼盼 酸梅汤 酸梅汁风味饮料 250ml*24盒 整箱 果汁饮料</p>
                                    </div>
                                </a>
                            </div>
                            <a href="javascript:;" class="aui-mail-payment">
                                <p>
                                    共<em>1</em>
                                    件商品 实付款: ￥<i>21.90</i>
                                </p>
                            </a>
                            <div class="aui-mail-button">
                                <a href="javascript:;">再次购买</a>
                                <a href="javascript:;" class="aui-df-color">评价晒单</a>
                                <a href="javascript:;" class="aui-df-color">查看发票</a>
                            </div>
                        </div>
                    </div>
                    <div class="tab-panel-item">
                        <div class="tab-item">
                            <a href="javascript:void(0);" class="aui-well-item aui-well-item-clear">
                                <div class="aui-well-item-hd">
                                    <img src="images/icon-logo.png" alt="">
                                </div>
                                <div class="aui-well-item-bd">
                                    <h3>魔霸旗舰店</h3>
                                </div>
                                <span class="aui-well-item-fr">已取消</span>
                            </a>
                            <div class="aui-mail-product">
                                <a href="javascript:;" class="aui-mail-product-item">
                                    <div class="aui-mail-product-item-hd">
                                        <img src="images/pd-005.png" alt="">
                                    </div>
                                    <div class="aui-mail-product-item-bd">
                                        <p>OPPO R15 全面屏双摄拍照手机 4G+128G 雪盈白 全网通 移动联通电信4G 双卡双待手机</p>
                                    </div>
                                </a>
                            </div>
                            <a href="javascript:;" class="aui-mail-payment">
                                <p>
                                    共<em>1</em>
                                    件商品 实付款: ￥<i>2499.00</i>
                                </p>
                            </a>
                            <div class="aui-mail-button">
                                <a href="javascript:;">再次购买</a>
                                <a href="javascript:;" class="aui-df-color">评价晒单</a>
                                <a href="javascript:;" class="aui-df-color">查看发票</a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </section>
    <script src="js/jquery.cookie.min.js"></script>
    <script>
        $('.aui-well-item-fr').click(function (e) {
            $.get('/del', { id: $(this).data('id') }, (data) => {
                alert(data)
                location.reload()
            })
        })
        $('.aui-mail-button').click(function (e) {
            var a1 = $(this).parents('.tab-item').find('.a1').data('name')
            var a2 = $(this).parents('.tab-item').find('.a2').html()
            var obj = {
                a1, a2
            }
            sessionStorage.setItem('zaici', JSON.stringify(obj))
        })
    </script>
</body>

</html>